Add support for multiple languages with configurable translations. Updated README with configuration instructions - #157
Open
tubby1981 wants to merge 31 commits into
Open
Add support for multiple languages with configurable translations. Updated README with configuration instructions#157tubby1981 wants to merge 31 commits into
tubby1981 wants to merge 31 commits into
Conversation
…dated README with configuration instructions
…dated README with configuration instructions
…French, German, and Turkish. Based on [xeonx/timeago](https://github.com/xeonx/timeago)
Show Org Unit (read-only) and Telephone Number (read-only) on the account settings page. Allow users to edit Job Title and Mobile Telephone Number. Depend on tubby1981/goipa v0.0.8 via go.mod replace for ou/title support. Rename packaged translation files to dutch.toml and english.toml.
Redirect expired logins to forgot-password, add timeout error templates, harden error logging and favicon startup, and document email logo_path.
Use generic email titles, footer text, and logo.png paths. Generalize gitignore patterns for local template override directories.
Use FreeIPA admin passwd, correct OTP/error handling, and vendored goipa with AdminSetPassword.
Use ResetPassword+SetPassword as primary flow and refresh krbPasswordExpiration from pwpolicy maxlife on admin passwd fallback.
Fall back to global_policy for maxlife, warn instead of failing after admin passwd, and use an anonymous client for self-service SetPassword.
Use ChangePassword after random reset, pwpolicy_find fallbacks, and accounts.password_max_life_days config.
Use pwpolicy min length and character classes per user with mokey.toml fallbacks.
HTMX did not always include browser-autofilled values in POST bodies, causing users to repeat the username step. Read input values from the DOM before submit and improve login form autocomplete semantics for password managers.
Support one-step login when username and password are posted together, strip credentials from auth URL query strings, accept CSRF via hidden form field, and add optional server.auth_debug logging for troubleshooting.
The link was only shown on the password step after consolidating username and password onto one screen.
neverlless
added a commit
to neverlless/mokey
that referenced
this pull request
Aug 15, 2026
Based on upstream PR ubccr/mokey#157 by @tubby1981, reimplemented on the current codebase. English and Dutch translation files (contributed in that PR) are embedded in the binary; site.default_language selects the language and site.translations_dir allows adding or overriding languages with <language>.toml files. Missing keys fall back to English. All templates, handler messages, and email subjects/bodies now go through the T() translation function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Translations
mokey supports multiple languages for its interface and email templates.
To configure translations:
#Default language for the site
#Languages supported: English (english), Dutch (dutch)
#Default is english
default_language = "dutch"
#Directory where translations can be placed
translations_dir = "/etc/mokey/translations"`
Users can translate mokey into their own language by creating a new .toml file in the translations_dir and referencing it in the default_language configuration. This allows for complete customization of the interface and email templates in the preferred language.